<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>DrawArea</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1">DrawArea</p>
<hr class="separator">
<div class="content">
The DrawArea class represents drawing surfaces, with methods for performing graphics primitives (such as drawing lines, shapes and texts) and the surfaces.<br><br>
All ChartDirector chart objects contains an internal DrawArea object for drawing the charts. This DrawArea object is accessible via <a href="BaseChart.getDrawArea.htm">BaseChart.getDrawArea</a> or <a href="BaseChart.makeChart3.htm">BaseChart.makeChart3</a>. This allows developers to apply custom graphics operations on the charts.<br><br>
ChartDirector also supports creating standalone DrawArea objects by calling the <a href="DrawArea.DrawArea.htm">DrawArea.DrawArea</a> constructor. One common application is to use ChartDirector as a general purpose graphics library (e.g. adding text annotations to existing images, creating GIF buttons on the fly, etc).
<br><br>
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Method</th><th width="19%">Inherited</th><th>Description</th>
</tr>
<tr>
<td><a href="DrawArea.DrawArea.htm">DrawArea</a></td><td>(Self)</td><td>Creates a DrawArea object.</td></tr><tr><td><a href="DrawArea.setSize.htm">setSize</a></td><td>(Self)</td><td>Sets the size and background color of the drawing surface.</td></tr><tr><td><a href="DrawArea.resize.htm">resize</a></td><td>(Self)</td><td>Resize the drawing surface.</td></tr><tr><td><a href="DrawArea.getWidth.htm">getWidth</a></td><td>(Self)</td><td>Gets the  width of the drawing surface in pixels.</td></tr><tr><td><a href="DrawArea.getHeight.htm">getHeight</a></td><td>(Self)</td><td>Gets the  height of the drawing surface in pixels.</td></tr><tr><td><a href="DrawArea.setClipRect.htm">setClipRect</a></td><td>(Self)</td><td>Sets the clip rectangle.</td></tr><tr><td><a href="DrawArea.setBgColor.htm">setBgColor</a></td><td>(Self)</td><td>Sets the background color of the image.</td></tr><tr><td><a href="DrawArea.move.htm">move</a></td><td>(Self)</td><td>Moves the drawing surface.</td></tr><tr><td><a href="DrawArea.rotate.htm">rotate</a></td><td>(Self)</td><td>Rotate the drawing surface.</td></tr><tr><td><a href="DrawArea.hFlip.htm">hFlip</a></td><td>(Self)</td><td>Flip the drawing surface along the central horizontal line.</td></tr><tr><td><a href="DrawArea.vFlip.htm">vFlip</a></td><td>(Self)</td><td>Flip the drawing surface along the central vertical line.</td></tr><tr><td><a href="DrawArea.clone.htm">clone</a></td><td>(Self)</td><td>Copy the current DrawArea object to another DrawArea object, with optional resizing.</td></tr><tr><td><a href="DrawArea.pixel.htm">pixel</a></td><td>(Self)</td><td>Draw a pixel.</td></tr><tr><td><a href="DrawArea.getPixel.htm">getPixel</a></td><td>(Self)</td><td>Gets the color of a pixel.</td></tr><tr><td><a href="DrawArea.line.htm">line</a></td><td>(Self)</td><td>Draw a straight line.</td></tr><tr><td><a href="DrawArea.hline.htm">hline</a></td><td>(Self)</td><td>Draws a horizontal line.</td></tr><tr><td><a href="DrawArea.vline.htm">vline</a></td><td>(Self)</td><td>Draws a vertical line.</td></tr><tr><td><a href="DrawArea.arc.htm">arc</a></td><td>(Self)</td><td>Draws a circular or elliptical arc.</td></tr><tr><td><a href="DrawArea.rect.htm">rect</a></td><td>(Self)</td><td>Draws a rectangle.</td></tr><tr><td><a href="DrawArea.polygon.htm">polygon</a></td><td>(Self)</td><td>Draws a polygon.</td></tr><tr><td><a href="DrawArea.polyShape.htm">polyShape</a></td><td>(Self)</td><td>Draws a shape.</td></tr><tr><td><a href="DrawArea.surface.htm">surface</a></td><td>(Self)</td><td>Draws a parallelogram.</td></tr><tr><td><a href="DrawArea.sector.htm">sector</a></td><td>(Self)</td><td>Draws a circular or elliptical sector.</td></tr><tr><td><a href="DrawArea.cylinder.htm">cylinder</a></td><td>(Self)</td><td>Draws a cylinder surface as the area spanned by moving an arc.</td></tr><tr><td><a href="DrawArea.circle.htm">circle</a></td><td>(Self)</td><td>Draws a circle or an ellipse.</td></tr><tr><td><a href="DrawArea.fill.htm">fill</a></td><td>(Self)</td><td>Flood fill a region using the specified color.</td></tr><tr><td><a href="DrawArea.fill2.htm">fill2</a></td><td>(Self)</td><td>Fill a region using the specified color, where the region is bounded by a given border color.</td></tr><tr><td><a href="DrawArea.text.htm">text</a></td><td>(Self)</td><td>Draws text. This method is a simplified version of the <a href="DrawArea.text2.htm">DrawArea.text2</a> method.</td></tr><tr><td><a href="DrawArea.text2.htm">text2</a></td><td>(Self)</td><td>Draws text.</td></tr><tr><td><a href="DrawArea.text3.htm">text3</a></td><td>(Self)</td><td>Creates a <a href="TTFText.htm">TTFText</a> object representing a text block. This method is a simplified version of the <a href="DrawArea.text4.htm">DrawArea.text4</a> method.</td></tr><tr><td><a href="DrawArea.text4.htm">text4</a></td><td>(Self)</td><td>Creates a <a href="TTFText.htm">TTFText</a> object representing a text block.</td></tr><tr><td><a href="DrawArea.setDefaultFonts.htm">setDefaultFonts</a></td><td>(Self)</td><td>Sets the defaults for normal, bold, italic and bold-italic fonts.</td></tr><tr><td><a href="DrawArea.setFontTable.htm">setFontTable</a></td><td>(Self)</td><td>Sets an entry in the font table to the specified font name.</td></tr><tr><td><a href="DrawArea.merge.htm">merge</a></td><td>(Self)</td><td>Copy another DrawArea to the current DrawArea.</td></tr><tr><td><a href="DrawArea.tile.htm">tile</a></td><td>(Self)</td><td>Copy another DrawArea to the current DrawArea as a wallpaper.</td></tr><tr><td><a href="DrawArea.setSearchPath.htm">setSearchPath</a></td><td>(Self)</td><td>Sets the search path for loading image files.</td></tr><tr><td><a href="DrawArea.setSearchPath2.htm">setSearchPath2</a></td><td>(Self)</td><td>Sets the ClassLoader for loading images.</td></tr><tr><td><a href="DrawArea.setSearchPath3.htm">setSearchPath3</a></td><td>(Self)</td><td>Search for image files using the ServletContext and ServletRequest.</td></tr><tr><td><a href="DrawArea.setSearchPath4.htm">setSearchPath4</a></td><td>(Self)</td><td>Search for image files using a URL as the base path.</td></tr><tr><td><a href="DrawArea.setResource.htm">setResource</a></td><td>(Self)</td><td>Assigns a resource ID to a memory block to allow it to be referenced using a resource path.</td></tr><tr><td><a href="DrawArea.setResource2.htm">setResource2</a></td><td>(Self)</td><td>Assigns a resource ID to a <a href="DrawArea.htm">DrawArea</a> object to allow it to be referenced using a resource path.</td></tr><tr><td><a href="DrawArea.load.htm">load</a></td><td>(Self)</td><td>Load an image file or resource into the current DrawArea, replacing any existing content.</td></tr><tr><td><a href="DrawArea.loadPNG.htm">loadPNG</a></td><td>(Self)</td><td>Load a PNG image or resource into the current DrawArea, replacing any existing content.</td></tr><tr><td><a href="DrawArea.loadGIF.htm">loadGIF</a></td><td>(Self)</td><td>Load a GIF image or resource into the current DrawArea, replacing any existing content.</td></tr><tr><td><a href="DrawArea.loadJPG.htm">loadJPG</a></td><td>(Self)</td><td>Load a JPG image or resource into the current DrawArea, replacing any existing content.</td></tr><tr><td><a href="DrawArea.loadWMP.htm">loadWMP</a></td><td>(Self)</td><td>Load a WAP bitmap image or resource into the current DrawArea, replacing any existing content.</td></tr><tr><td><a href="DrawArea.rAffineTransform.htm">rAffineTransform</a></td><td>(Self)</td><td>Perform reverse affine transformation on the drawing surface.</td></tr><tr><td><a href="DrawArea.affineTransform.htm">affineTransform</a></td><td>(Self)</td><td>Perform affine transformation on the drawing surface.</td></tr><tr><td><a href="DrawArea.sphereTransform.htm">sphereTransform</a></td><td>(Self)</td><td>Wraps the drawing surface onto a sphere or ellipsoid.</td></tr><tr><td><a href="DrawArea.hCylinderTransform.htm">hCylinderTransform</a></td><td>(Self)</td><td>Wraps the drawing surface onto a horizontal cylinder.</td></tr><tr><td><a href="DrawArea.vCylinderTransform.htm">vCylinderTransform</a></td><td>(Self)</td><td>Wraps the drawing surface onto a vertical cylinder.</td></tr><tr><td><a href="DrawArea.hTriangleTransform.htm">hTriangleTransform</a></td><td>(Self)</td><td>Wraps the drawing surface onto a horizontal triangle pointing leftwards.</td></tr><tr><td><a href="DrawArea.vTriangleTransform.htm">vTriangleTransform</a></td><td>(Self)</td><td>Wraps the drawing surface onto a vertical triangle pointing upwards.</td></tr><tr><td><a href="DrawArea.shearTransform.htm">shearTransform</a></td><td>(Self)</td><td>Shear the drawing surface.</td></tr><tr><td><a href="DrawArea.waveTransform.htm">waveTransform</a></td><td>(Self)</td><td>Moves the pixels on the drawing surface according to a sinusoidal function to achieve a wave effect.</td></tr><tr><td><a href="DrawArea.enableVectorOutput.htm">enableVectorOutput</a></td><td>(Self)</td><td>This method is deprecated. It has no effect and may be removed in future versions of ChartDirector.</td></tr><tr><td><a href="DrawArea.setOutputOptions.htm">setOutputOptions</a></td><td>(Self)</td><td>Sets output format options for the next chart output.</td></tr><tr><td><a href="DrawArea.out.htm">out</a></td><td>(Self)</td><td>Writes the DrawArea to an image file.</td></tr><tr><td><a href="DrawArea.outPNG.htm">outPNG</a></td><td>(Self)</td><td>Writes the DrawArea to a PNG image file.</td></tr><tr><td><a href="DrawArea.outPNG2.htm">outPNG2</a></td><td>(Self)</td><td>Writes the DrawArea as a PNG image to memory.</td></tr><tr><td><a href="DrawArea.outGIF.htm">outGIF</a></td><td>(Self)</td><td>Writes the DrawArea to a GIF image file.</td></tr><tr><td><a href="DrawArea.outGIF2.htm">outGIF2</a></td><td>(Self)</td><td>Writes the DrawArea as a GIF image to memory.</td></tr><tr><td><a href="DrawArea.outJPG.htm">outJPG</a></td><td>(Self)</td><td>Writes the DrawArea to a JPEG image file.</td></tr><tr><td><a href="DrawArea.outJPG2.htm">outJPG2</a></td><td>(Self)</td><td>Writes the DrawArea as a JPEG image to memory.</td></tr><tr><td><a href="DrawArea.outBMP.htm">outBMP</a></td><td>(Self)</td><td>Writes the DrawArea to a BMP image file.</td></tr><tr><td><a href="DrawArea.outBMP2.htm">outBMP2</a></td><td>(Self)</td><td>Writes the DrawArea as a BMP image to memory.</td></tr><tr><td><a href="DrawArea.outWMP.htm">outWMP</a></td><td>(Self)</td><td>Writes the DrawArea to a WAP bitmap image file.</td></tr><tr><td><a href="DrawArea.outWMP2.htm">outWMP2</a></td><td>(Self)</td><td>Writes the DrawArea as a WAP bitmap image to memory.</td></tr><tr><td><a href="DrawArea.outSVG.htm">outSVG</a></td><td>(Self)</td><td>Writes the DrawArea to a SVG or SVGZ image file.</td></tr><tr><td><a href="DrawArea.outSVG2.htm">outSVG2</a></td><td>(Self)</td><td>Writes the DrawArea as a SVG or SVGZ image to memory.</td></tr><tr><td><a href="DrawArea.outPDF.htm">outPDF</a></td><td>(Self)</td><td>Writes the DrawArea to a PDF image file.</td></tr><tr><td><a href="DrawArea.outPDF2.htm">outPDF2</a></td><td>(Self)</td><td>Writes the DrawArea as a PDF image to memory.</td></tr><tr><td><a href="DrawArea.setPaletteMode.htm">setPaletteMode</a></td><td>(Self)</td><td>Sets the palette mode to use when writing the image in PNG format.</td></tr><tr><td><a href="DrawArea.setDitherMethod.htm">setDitherMethod</a></td><td>(Self)</td><td>Sets the dithering method in case dithering is necessary.</td></tr><tr><td><a href="DrawArea.setTransparentColor.htm">setTransparentColor</a></td><td>(Self)</td><td>Specifies a certain color to mean transparent when creating a raster image output.</td></tr><tr><td><a href="DrawArea.setAntiAlias.htm">setAntiAlias</a></td><td>(Self)</td><td>Controls whether anti-alias is used when drawing lines, shapes and text.</td></tr><tr><td><a href="DrawArea.setInterlace.htm">setInterlace</a></td><td>(Self)</td><td>Sets the interlace mode when creating the image.</td></tr><tr><td><a href="DrawArea.setColorTable.htm">setColorTable</a></td><td>(Self)</td><td>Change the colors in the palette starting with the specified offset position.</td></tr><tr><td><a href="DrawArea.getARGBColor.htm">getARGBColor</a></td><td>(Self)</td><td>Obtain the ARGB color given a palette color.</td></tr><tr><td><a href="DrawArea.adjustBrightness.htm">adjustBrightness</a></td><td>(Self)</td><td>Creates a color that is a darkened or brightened version of the given color.</td></tr><tr><td><a href="DrawArea.halfColor.htm">halfColor</a></td><td>(Self)</td><td>Creates a color that is half the intensity of the given color.</td></tr><tr><td><a href="DrawArea.dashLineColor.htm">dashLineColor</a></td><td>(Self)</td><td>Creates a dash line color.</td></tr><tr><td><a href="DrawArea.patternColor.htm">patternColor</a></td><td>(Self)</td><td>Creates a pattern color using an array of colors as the bitmap pattern.</td></tr><tr><td><a href="DrawArea.patternColor2.htm">patternColor2</a></td><td>(Self)</td><td>Creates a pattern color by using the image from the specified file or resource as the pattern.</td></tr><tr><td><a href="DrawArea.linearGradientColor.htm">linearGradientColor</a></td><td>(Self)</td><td>Creates a two-point linear gradient color.</td></tr><tr><td><a href="DrawArea.linearGradientColor2.htm">linearGradientColor2</a></td><td>(Self)</td><td>Creates a multi-point linear gradient color.</td></tr><tr><td><a href="DrawArea.radialGradientColor.htm">radialGradientColor</a></td><td>(Self)</td><td>Creates a two-point radial gradient color.</td></tr><tr><td><a href="DrawArea.radialGradientColor2.htm">radialGradientColor2</a></td><td>(Self)</td><td>Creates a multi-point radial gradient color.</td></tr><tr><td><a href="DrawArea.angleGradientColor.htm">angleGradientColor</a></td><td>(Self)</td><td>Creates an angle gradient color.</td></tr><tr><td><a href="DrawArea.gradientColor.htm">gradientColor</a></td><td>(Self)</td><td>Creates a two-point linear gradient color.</td></tr><tr><td><a href="DrawArea.gradientColor2.htm">gradientColor2</a></td><td>(Self)</td><td>Creates a multi-point linear gradient color.</td></tr><tr><td><a href="DrawArea.reduceColors.htm">reduceColors</a></td><td>(Self)</td><td>Reduces the number of colors in the image.</td>
</tr>
</table>
</div>

</div>
<hr class="separator"><div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
